package kr.or.kosta.otr.persistence.companyreviewtype;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.annotation.Resource;

import kr.or.kosta.otr.vo.CompanyReviewTypeVO;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository("CompanyReviewTypeDao")
public class CompanyReviewTypeDaoImpl implements CompanyReviewTypeDao{
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}
	
	@Override
	public ArrayList<CompanyReviewTypeVO> getAllCompanyReviewType()
			throws SQLException {
		return (ArrayList<CompanyReviewTypeVO>) sqlMapClient.queryForList("CompanyReviewType.getAllCompanyReviewType");
	}

	@Override
	public CompanyReviewTypeVO getCompanyReviewType(int companyReveiewId)
			throws SQLException {
		return (CompanyReviewTypeVO) sqlMapClient.queryForObject("CompanyReviewType.getCompanyReviewType",companyReveiewId);
	}

}
